package com.itmk.web.course.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itmk.web.course.entity.Course;
import com.itmk.web.course.entity.CourseParm;
import com.itmk.web.course.entity.SelectCourse;
import com.itmk.web.course.mapper.CourseMapper;
import com.itmk.web.course.service.CourseService;
import org.springframework.stereotype.Service;

/**
 * @Author java实战基地
 * @Version 3501754007
 */
@Service
public class CourseServiceImpl extends ServiceImpl<CourseMapper, Course> implements CourseService {
    @Override
    public IPage<Course> getSelectCourse(CourseParm parm) {
        IPage<Course> page = new Page<>(parm.getCurrentPage(),parm.getPageSize());
        return this.baseMapper.getSelectCourse(page,parm);
    }

    @Override
    public IPage<SelectCourse> getStuCourse(CourseParm parm) {
        IPage<SelectCourse> page = new Page<>(parm.getCurrentPage(),parm.getPageSize());
        return this.baseMapper.getStuCourse(page,parm);
    }

    @Override
    public IPage<Course> getTeacherCourse(CourseParm parm) {
        IPage<Course> page = new Page<>(parm.getCurrentPage(),parm.getPageSize());
        return this.baseMapper.getTeacherCourse(page,parm);
    }
}
